package cn.silver.module.system.domain;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.annotation.TableField;
import cn.silver.framework.mybatis.enums.SearchEnums;
import cn.silver.framework.mybatis.domain.BusEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;

/**
 * 用户和岗位关联 sys_user_post
 *
 * @author Silver Zhou
 */

@Data
@Table(name = "sys_user_post")
@EqualsAndHashCode(callSuper = true)
@Schema(name = "SysUserPost", title = "用户职务信息对象")
public class SysUserPost extends BusEntity {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 岗位ID
     */
    @Schema(title = "部门岗位主键")
    @TableField(name = "dept_post_id", searchType = SearchEnums.EQ)
    private String deptPostId;
    /**
     * 岗位ID
     */
    @Schema(title = "部门主键")
    @TableField(name = "dept_id", searchType = SearchEnums.EQ)
    private String deptId;
    /**
     * 岗位ID
     */
    @Schema(title = "岗位主键")
    @TableField(name = "post_id", searchType = SearchEnums.EQ)
    private String postId;

    /**
     * 用户ID
     */
    @Schema(title = "用户主键")
    @TableField(name = "user_id", searchType = SearchEnums.EQ)
    private String userId;
    /**
     * 任职类型
     */
    @Schema(title = "任职类型")
    @TableField(name = "type", searchType = SearchEnums.EQ)
    private String type;
    /**
     * 任职状态
     */
    @Schema(title = "任职状态")
    @TableField(name = "status", searchType = SearchEnums.EQ)
    private String status;
    /**
     * 开始时间
     */
    @Schema(title = "开始时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD)
    private Date startTime;
    /**
     * 结束时间
     */
    @Schema(title = "结束时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD)
    private Date stopTime;

}
